package com.pp.common.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;


@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("tag")
public class Tag extends BasePojo {

    /**
     * 标签 ID
     */
    @TableId(value="id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 标签的父级标签 ID (默认一级)
     */
    @Builder.Default
    @TableField("parent_id")
    private Integer parentId = 0;

    /**
     * 标签名称
     */
    @TableField("tag_name")
    private String tagName;

    /**
     * 标签备注
     */
    @TableField("tag_note")
    private String tagNote;

    /*
     * 标签层级: 一级、二级和三级标签 (默认一级)
     */
    @Builder.Default
    @TableField("tag_level")
    private Integer tagLevel = 1;

    /**
     * 当前标签下帖子的数量 (默认是 1)
     */
    @Builder.Default
    @TableField("post_num")
    private Integer postNum = 1;

    /**
     * 标签状态 0 - 禁用 1 - 启用
     */
    @Builder.Default
    @TableField("tag_status")
    private Boolean tagStatus = true;

}
